import 'package:bike_ride/common/util/hysize_fit.dart';
import 'package:flutter/material.dart';

class BottomButtons extends StatelessWidget {
  final List<Widget>? children;
  final Widget? child;
  final bool? hasRadius;

  const BottomButtons({Key? key, this.children, this.child, this.hasRadius})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(
          top: 30.rpx, left: 28.rpx, right: 28.rpx, bottom: 20.rpx),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: hasRadius == true
            ? BorderRadius.only(
                topLeft: Radius.circular(40.rpx),
                topRight: Radius.circular(40.rpx),
              )
            : null,
        boxShadow: [
          BoxShadow(
            color: Colors.black.withOpacity(0.1),
            offset: Offset(4.rpx, 0),
            blurRadius: 24.rpx,
            spreadRadius: 8.rpx,
          )
        ],
      ),
      child: child ??
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: children ?? [],
          ),
    );
  }
}
